<?php

namespace mpend\modules\cms\controllers;

use Yii;
use mpend\components\Controller;
use mpend\modules\cms\models\ArticleView;

/**
 * 页面tabs
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class NoticeController extends Controller {

    /**
     * @inheritdoc
     */
    protected function verbs() {
        return [
            '*' => ['GET']
        ];
    }

    /**
     * @inheritdoc
     */
    public function actionIndex() {
        return ArticleView::find()->active(ArticleView::STATUS_ACTIVE)->andWhere([
            'channel_id' => 1,
        ])->orderBy([
            'publish_at' => SORT_DESC
        ])->one();
    }

}
